HREFButton and HREFiButton are related Java(tm) classes that provide an alternative to using still bitmaps or html forms when an html author wishes to attach a URL link to a graphical button. HREFButton creates a simple button without any custom images, while HREFiButton creates a simple button first, but then replaces it with a button created using two supplied images. The simple button is only displayed while the images are loaidng to prevent a blank area in the document. The classes are distributed with two sample applets that can be used unmodified to place buttons on a web page.
To download the HREF Buttons, you must first read the license agreement.
There are two sample applets, one uses HREFButton, the other uses HREFiButton. To use these applets, place the appropriate one and it's matching HREFButton .class file on your web site and include an <APPLET> tag on your web page.
HREFButtonApplet.class requires HREFButton.class while HREFiButtonApplet.class requires HREFiButton.class.
The syntax for HREFButtonApplet is:
<Applet codebase="LOCATION" code="HREFButtonApplet.class" width=AWIDTH height=AHEIGHT> <PARAM name="label" value="ALABEL"> <PARAM name="href" value="URL"> <PARAM name="frame" value="URLFRAME"> </APPLET>
The syntax for HREFiButtonApplet is the same as HREFButtonApplet except that
code="HREFiButtonApplet.class"
,
PARAM name="label" is used for a temporary button
while the images are loading and there are two additional
required parameters:
<PARAM name="upImage" value="UP.GIF"> <PARAM name="downImage" value="DOWN.GIF">
Some alternate html text should also be included within the <APPLET> and </APPLET&ggt tags to provide an alternative for users with non-Java capable browsers.
HREFButton.class and HREFiButton.class are classes that can be used in other Java(tm) applets. To use one of these in an applet, simply include the .class file in you CLASSPATH and use it as AWT objects are used. The only public methods are a single constructor for each class, however since they are derived AWT components all Component methods are available. (The current release is actually derived from Frame, however a future release may be drived directly from Component.)
The source for HREFButtonApplet and HREFiButtonApplet are included as examples.
public HREFButton(Applet parent, String href, String frame, String label)
public HREFiButton(Applet parent, String href, String frame, String label, String upImage, String downImage)
To download the HREF Buttons, you must first read the license agreement.